package com.chcit.mobile.app.base;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.chcit.custom.view.toolbar.CommonToolbar;
import com.jess.arms.base.BaseFragment;
import com.jess.arms.mvp.IPresenter;
import java.util.Objects;


public abstract class SupportToolbarFragement<P extends IPresenter> extends BaseFragment<P> {

    public CommonToolbar mCommonToolbar;


    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        mCommonToolbar = getProActivity().getmCommonToolbar();

    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view =  super.onCreateView(inflater,container,savedInstanceState);

        return  view;
    }


    public  SupportToolbarActicity getProActivity() {
        return (SupportToolbarActicity)SupportToolbarFragement.this.getActivity();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        mCommonToolbar = null;
    }



}
